package com.iye.puretennis.domain;

import com.iye.puretennis.helper.Constant;

/**
 * Created with IntelliJ IDEA.
 * User: jing wu
 * Date: 2014/12/10
 * Time: 12:55
 */
public class UserInfo {

    private String guid;

    protected String nickname;

    private String gender;
    //my idol guid
    private String idolGuid;

    private String imageBase64Byte;

    private boolean uploadImage;

    private boolean friend;

    private boolean request = false;

    private String requestGuid;

    private Location location;


    public UserInfo(String guid, String nickname, String imageBase64Byte,boolean uploadImage) {
        this.guid = guid;
        this.nickname = nickname;
        this.imageBase64Byte = imageBase64Byte;
        this.uploadImage = uploadImage;
    }

    public UserInfo(String guid, String nickname, String imageBase64Byte, String requestGuid,boolean uploadImage) {
        this(guid, nickname, imageBase64Byte,uploadImage);
        this.requestGuid = requestGuid;
        this.request = true;
    }

    public UserInfo(String guid, String nickname, String gender, String idolGuid, String imageBase64Byte, boolean friend, Location location,boolean uploadImage) {
        this(guid, nickname, imageBase64Byte,uploadImage);
        this.gender = gender;
        this.idolGuid = idolGuid;
        this.friend = friend;
        this.location = location;
    }

    public String getGuid() {
        return guid;
    }

    public String getRequestGuid() {
        return requestGuid;
    }

    public String getNickname(String currentGuid) {
        if(guid.equals(currentGuid)){
            return Constant.ME;
        }

        return nickname;
    }

    public String getGender() {
        return gender;
    }

    public String getIdolGuid() {
        return idolGuid;
    }

    public String getImageBase64Byte() {
        return imageBase64Byte;
    }

    public boolean isRequest() {
        return request;
    }

    public boolean isFriend() {
        return friend;
    }

    public void setRequest(boolean request) {
        this.request = request;
    }

    public Location getLocation() {
        return location;
    }

    public boolean isUploadImage() {
        return uploadImage;
    }
}
